<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>方案管理</title>
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
    <link th:href="@{/font-awesome/css/font-awesome.css}" rel="stylesheet">
    <link th:href="@{/css/animate.css}" rel="stylesheet">
    <link th:href="@{/css/style.css}" rel="stylesheet">
    <link th:href="@{/css/mypage.css}" rel="stylesheet">
    <link th:href="@{/css/custom.css}" rel="stylesheet">

    <script th:src="@{/js/jquery-2.1.1.js}"></script>

    <script th:src="@{/js/select2.min.js}"></script>
    <script th:src="@{/js/zh-CN.js}"></script>
    <link th:href="@{/css/select2.min.css}" rel="stylesheet">
    <style type="text/css">
        .textAlign th {
            text-align: center;
        }

        .textAlign td {
            text-align: center;
        }
    </style>
</head>
<body>
<div id="wrapper">
    <!-- left -->
    <!--<nav class="navbar-default navbar-static-side" role="navigation">-->
        <!--<div class="sidebar-collapse">-->
            <!--<ul class="nav metismenu" id="side-menu">-->
                <!--<li class="nav-header">-->
                    <!--<div class="dropdown profile-element" style="text-align: center;">-->
                        	<!--<span>-->
                            <!--<img alt="image" class="img-circle" th:src="@{/img/profile_small.jpg}"/>-->
                             <!--</span>-->
                        <!--<a href="#">-->
                            <!--<span class="clear"> <span class="block m-t-xs"> <strong class="font-bold">admin</strong>-->
                             <!--</span> </span>-->
                        <!--</a>-->
                    <!--</div>-->
                <!--</li>-->
                <!--<li class="active">-->
                    <!--<a href="#"><i class="fa fa-user"></i> <span class="nav-label">用户管理</span> </a>-->
                <!--</li>-->
                <!--<li>-->
                    <!--<a href="/userlog/list"><i class="fa fa-bars"></i> <span class="nav-label">日志管理</span> </a>-->
                <!--</li>-->
            <!--</ul>-->
        <!--</div>-->
    <!--</nav>-->
    <div th:replace="left::left"></div>

    <div id="page-wrapper" class="gray-bg">
        <!-- head start -->
        <div class="row border-bottom">
            <nav class="navbar navbar-static-top" role="navigation"
                 style="margin-bottom: 0">
                <div class="navbar-header nav-title">
                    <a class=" minimalize-styl-2 btn btn-primary "><i
                            class="fa fa-align-left"></i> </a>
                    <form role="search" class="navbar-form-custom"
                          action="search_results.html">
                        <div class="form-group">
                            <input type="text" placeholder="舆情用户管理系统" readonly="readonly"
                                   class="form-control" name="top-search" id="top-search">
                        </div>
                    </form>
                </div>
                <ul class="nav navbar-top-links navbar-right">
                    <li><a href="/logout"> <i class="fa fa-sign-out"></i> 退出登录
                    </a></li>
                </ul>
            </nav>
        </div>
        <!-- Top Bar -->
        <div id="topBar">
            <div class="row wrapper border-bottom white-bg page-heading">
                <div class="col-lg-10">
                    <h2 id="head"></h2>
                    <ol class="breadcrumb">
                        <li class="nav-main1"><a href="#">主页</a></li>
                        <li class="active"><strong id="navigation"></strong></li>
                    </ol>
                </div>
            </div>

        </div>
        <div class="wrapper wrapper-content">
            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>全部</h5>
                            <div style="display: inline-block; margin-left: 5%">
                            被拷贝的用户：
                            <select id="users">
                                <option value="">--请选择被拷贝的用户--</option>
                            </select>
                            </div>

                            <div style="display: inline-block; margin-left: 5%">
                            被拷贝的方案组：
                            <select id="groups">
                                <option value="">--请选择被拷贝的方案组--</option>
                            </select>
                            </div>

                            <div style="display: inline-block; margin-left: 5%">
                            拷贝到哪个用户下：
                            <select id="toUser">
                                <option value="">--请选择拷贝到哪个用户下--</option>
                            </select>
                            </div>

                        </div>
                        <div class="ibox-content">
                            <div class="row"></div>
                            <div class="table-responsive">
                                <table class="table table-hover">
                                    <thead>
                                    <tr class="textAlign">
                                        <th>方案名</th>
                                        <th>方案类型</th>
                                        <th>方案描述</th>
                                        <th>主体词</th>
                                        <th>人物词</th>
                                        <th>事件词</th>
                                       <!-- <th>创建日期</th>-->
                                        <th>地域词</th>
                                        <th>屏蔽词</th>
                                        <!--<th>有效期</th>-->
                                        <!--<thuserlist>操作</thuserlist>-->
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody id="projectlist">
                                    </tbody>
                                </table>
                            </div>
                            <div class="text-center" align="center">
                                <div class="box" id="box"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- Mainly scripts -->


<script th:src="@{/js/bootstrap.min.js}"></script>
<script th:src="@{/js/plugins/metisMenu/jquery.metisMenu.js}"></script>
<script th:src="@{/js/plugins/slimscroll/jquery.slimscroll.min.js}"></script>


<!-- Custom and plugin javascript -->
<script th:src="@{/js/inspinia.js}"></script>
<script th:src="@{/js/plugins/pace/pace.min.js}"></script>
<script th:src="@{/js/mypage.js}"></script>
<script th:src="@{/js/slef/projectList.js}"></script>
<div class="page-footer">
    © 2014-<span id="currentyear"></span> 南京涌亿思信息技术有限公司 苏ICP备17066984号-1
</div>
</body>

<script th:inline="javascript" type="text/javascript">
    var ctxPath = /*[[@{/}]]*/'';
    $("#currentyear").text((new Date()).getFullYear());
    var selectorx = $('#users').select2();
    var selectorx = $('#groups').select2();
    var selectorx = $('#toUser').select2();


    var userList;

    $.ajax({
        type: "get",
        url: "/project/getUsers",
        success: function (res) {
            if (res.code == 200){
                let data = res.data;
                userList = data;
                for (var i = 0; i < data.length ; i++){
                    let user = data[i];

                    let user_id = user.user_id;
                    let  username = user.username;

                    if (username != null && username!= '' && user_id != null && user_id != '') {
                        $('#users').append('<option value="' + user_id + '">' + username + '</option>')
                        $('#toUser').append('<option value="' + user_id + '">' + username + '</option>')
                    }
                }
            }else if (res.code == 0){
                alert("无数据");
            }else{
                alert("查询出错");
            }

    }
    })

</script>
</html>
